-module(tr_server_sup_sup).
-behaviour(supervisor).

-export([start_link/1]).

-export([init/1]).

-define(CHILD(Id, Mod, StartUp, Type, Args), {Id, {Mod, StartUp, Args},
                                     permanent, 5000, Type, [Mod]}).
-define(CHILD2(Id, Mod, StartUp, Type, Args), {Id, {Mod, StartUp, Args},
                                     temporary, 5000, Type, [Mod]}).
start_link(Port) ->
    supervisor:start_link({local, ?MODULE}, ?MODULE, [Port]).

init([Port]) ->
    {ok, {{one_for_one, 0, 1}, 
          [?CHILD2(tr_server, tr_server, start_link_v2, worker, [Port]),
           ?CHILD(tr_server_sup, tr_server_sup, start_link, supervisor, [])]}}.

